<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子39-JS进阶（二）</title>
    </head>

    <body>
        <pre>
            <code>
                    // 例子39

                    var person = {}

                    Object.defineProperty(person, 'name', {
                        value: 'Tom',
                        writable: false,
                        configurable: false
                    })

                    var descripter = Object.getOwnPropertyDescriptor(person, 'name');

                    console.log(descripter);  // 返回结果如下

                    descripter = {
                        configurable: false,
                        enumerable: false,
                        value: 'Tom',
                        writable: false
                    }

            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/39.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>

</html>